package com.zou.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/*
 * @auth zoujt
 * @date 2021/3/17
 * @Description
 */
@Data
@TableName("sys_user")
public class User implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId
    private Long userId;

    private String username;

    private String name;

    private String password;

    private String salt;

    private String email;

    private String mobile;

    private Integer status;

    //身份类型-0为前端注册上来的普通大众;1-为后端管理平台新增的人员
    private Integer type = 0;

    private Date createTime;

    private Long deptId;

    private String imgUrl;

    //@TableField：字段属性不为数据库表字段，但又是必须使用的
    @TableField(exist = false)
    private List<Long> roleIdList;

    @TableField(exist = false)
    private String deptName;

    @TableField(exist = false)
    private List<Long> postIdList;

    @TableField(exist = false)
    private String postName;
}
